home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7140 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: nwgw.infi.net!usenet
  2. From: dhopkins@infi.net (DHopkins)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: unsigned long addition question(GDS)
  5. Date: 10 Apr 1996 10:27:07 GMT
  6. Organization: InfiNet
  7. Message-ID: <1052.6674T364T2106@infi.net>
  8. NNTP-Posting-Host: pa8dsp3.orf.infi.net
  9. X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
  10.  
  11. I'm using Gamesmith with SAS/C and have run into a complete
  12. blank in my math knowledge. GDS uses an 8-bit color table
  13. eg. 0x00rrggbb. Usually, I just ignore this type of stuff
  14. but now it's hit me square in the face.
  15.  
  16. I want to do a screen fade and figured that I'd use the
  17. gs_SetRGB function to fade each color. the Commodore
  18. version of SetRGB32 lets you enter a value for r, g, and b.
  19. But gs_SetRGB only has 1 variable for the color, and it
  20. has r,g,b embedded in it.(like I said, 0x00rrggbb). How
  21. can I subtract from just r,g or b?
  22.  
  23. I don't think I can do this...
  24.  
  25. n=0x00rrggbb
  26. n--
  27.  
  28. but what about...
  29.  
  30. n = 0x00rrggbb - 0x000001  (to subtract from b)
  31.  
  32. or
  33.  
  34. n = 0x00rrggbb - 0x00010000 (to subtract from r)
  35.  
  36.  
  37. and would a maxed out register look like 0x000f0000 (for max red)?
  38.  
  39. thanks for any help...
  40.  
  41.                                                 D
  42.  
  43.  
  44. dhopkins@infi.net'1edv[please excuse the mess while3g4awsxcvz4r3t
  45. AMIGA 1200 030/50mhz.d[this .sig is being remodeledg5SEBR$%5fq3#%G
  46. r6t4555thgbcsr6rg8il34[33rzdbzd xv455e55tg24wgrvaer#RsE6#3$G#$TWDw
  47.  
  48.  
  49.